//
//  ZPayResultHeaderView.m
//  DoctorFAQs
//
//  Created by zjq on 17/2/16.
//  Copyright © 2017年 zjq. All rights reserved.
//

#import "ZPayResultHeaderView.h"

@implementation ZPayResultHeaderView
- (instancetype)init
{
    self = [super init];
    if (self) {
        [self initlizeInterface];
    }
    return self;
}
- (void)initlizeInterface {
    self.backgroundColor = [UIColor whiteColor];
    _imageView = [[UIImageView alloc] init];
    _titleLabel = [[UILabel alloc] init];
    _titleLabel.font = [UIFont systemFontOfSize:20];
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    UIView * view = [[UIView alloc] init];
    view.backgroundColor = KHGaryColor666;
    view.alpha = 0.2;
    UIView * view2 = [[UIView alloc] init];
    view2.backgroundColor = KHGaryColor666;
    view2.alpha = 0.2;
    [self addSubview:_imageView];
    [self addSubview:_titleLabel];
    [self addSubview:view];
    [self addSubview:view2];
    
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.width.equalTo(self);
        make.height.offset(2*ysIZE);
    }];
    
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(40*ysIZE);
        make.centerX.equalTo(self);
        make.width.height.offset(80*xsIZE);
    }];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(_imageView);
        make.height.offset(20*ysIZE);
        make.width.offset(200*xsIZE);
        make.top.equalTo(_imageView.mas_bottom).offset(20*ysIZE);
    }];
    [view2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.bottom.equalTo(self).offset(-5*ysIZE);
        make.width.equalTo(self).multipliedBy(0.8);
        make.height.offset(ysIZE);
    }];
    
}


@end
